home *** CD-ROM | disk | FTP | other *** search
-
- var gsTabControl="";
- var gaDivs = new Array();
-
- function initTabbedMembers()
- {
- var persistedTab=0;
- divscol=document.all.tags("div");
- divsize=divscol.length;
- if (divsize>0)
- {
- gsTabControl='<TABLE id=tblTabbed style="BORDER-RIGHT: #99ccff 2px solid; BORDER-TOP: #99ccff 2px solid; BORDER-LEFT: #99ccff 2px solid; BORDER-BOTTOM: #99ccff 2px solid; cellSpacing: 0; cellPadding: 5; border=0"><TBODY><TR class=clsTab>'
- for (var i=0;i<divsize;i++)
- {
- thisdiv=divscol.item(i);
- if (thisdiv.tabName)
- {
- gaDivs[gaDivs.length]=thisdiv;
- // peterril (01/16/01): resolved bug #19405, added keyboard accessibility support.
- gsTabControl=gsTabControl + '<TD onkeypress="tabToggle(this);" tabindex="0" onfocus="if(this.style.color!=\'black\') this.style.color=\'yellow\';" onblur="if(this.style.color==\'yellow\') this.style.color=\'white\';" title="' + thisdiv.tabName + '" class=clsTab id=' + thisdiv.tabName + ' style="BACKGROUND: #666666" onclick="tabToggle(this);"> ' + thisdiv.tabName + ' </TD>'
- var sPTagSourceIndex=thisdiv.sourceIndex-1;
- document.all(sPTagSourceIndex).outerHTML="";
- }
- }
- gsTabControl=gsTabControl + '</TR></TBODY></TABLE>'
- if (document.all.item('expandoTabDiv'))
- {
- expandoTabDiv.insertAdjacentHTML("beforeBegin", gsTabControl);
- if (oBD.doesPersistence)
- {
- expandoTabDiv.addBehavior("#default#userData");
- expandoTabDiv.load(gsStoreName);
- persistedTab=expandoTabDiv.getAttribute("selectedTab")
- if (!persistedTab)
- {
- persistedTab=0;
- }
- }
- if (persistedTab >= gaDivs.length)
- {
- persistedTab=0;
- }
- var tabId=gaDivs[persistedTab].tabName;
- setColumnSizes();
- tabToggle(tblTabbed.all(tabId));
- var persistedScroll=expandoTabDiv.getAttribute("scroll")
- expandoTabDiv.scrollTop=persistedScroll;
- }
- }
- }
-
- function FixMac()
- {
- for (var i=0;i<gaDivs.length;i++)
- {
- gaDivs[i].style.display="block";
- gaDivs[i].style.visibility="visible";
- }
- }
-
- function tabToggle(tab)
- {
- for (var i=0;i<gaDivs.length;i++)
- {
- if (gaDivs[i].tabName==tab.id)
- {
- tab.style.backgroundColor="";
- tab.style.color="black"
- gaDivs[i].style.display="block";
- if (oBD.doesPersistence)
- {
- expandoTabDiv.setAttribute("selectedTab",i);
- expandoTabDiv.save(gsStoreName);
- }
- var colRows=gaDivs[i].all.tags("TR");
- if (gaDivs[i].offsetHeight<(expandoTabDiv.offsetHeight-20))
- {
- colRows(colRows.length-1).style.height=(expandoTabDiv.offsetHeight-gaDivs[i].offsetHeight+4);
- }
- }
- else
- {
- var tabId=gaDivs[i].tabName;
- var offTab=tblTabbed.all(tabId);
- offTab.style.backgroundColor="#6699cc";
- offTab.style.color="white";
- gaDivs[i].style.display="none";
- }
- }
- }
-
- function setColumnSizes()
- {
- var maxWidth=0;
- for (var i=0;i<gaDivs.length;i++)
- {
- gaDivs[i].style.visibility="hidden";
- gaDivs[i].style.display="block";
- var colCells=gaDivs[i].all.tags("TD");
- var width=colCells(0).offsetWidth;
- if (width>maxWidth)
- {
- maxWidth=width
- }
- }
- for (var i=0;i<gaDivs.length;i++)
- {
- gaDivs[i].style.visibility="visible";
- gaDivs[i].style.display="none";
- var colCells=gaDivs[i].all.tags("TH");
- colCells(0).style.pixelWidth=maxWidth;
- }
- }
-
- function tableScroll()
- {
- if (oBD.doesPersistence)
- {
- expandoTabDiv.setAttribute("scroll",event.srcElement.scrollTop);
- expandoTabDiv.save(gsStoreName);
- }
- }
-
- function insertDivOpen()
- {
- var divElement='<DIV ID="expandoTabDiv" onScroll="tableScroll()" STYLE="scrollbar-base-color: #99ccff; BACKGROUND: #99ccff; POSITION: relative; top:-3px; BORDER-RIGHT: #99ccff 2px solid; BORDER-TOP: #99ccff 2px solid; PADDING-BOTTOM: 10px; OVERFLOW: auto; BORDER-LEFT: #99ccff 2px solid; WIDTH: 95&percent; BORDER-BOTTOM: #99ccff 2px solid; HEIGHT: 300px">'
- document.write(divElement);
- }
-
- function insertDivClose()
- {
- var divElement='</DIV>'
- document.write(divElement);
- }
-